package org.example;

public class AddNode extends ExprNode {
    public AddNode(ExprNode left, Token addToken, ExprNode right) {
        super(addToken);

        addChild(left);
        addChild(right);

        if (left.getEvalType() == ExprNode.tINTEGER && right.getEvalType() == ExprNode.tINTEGER) {
            evalType = ExprNode.tINTEGER;
        } else if (left.getEvalType() == ExprNode.tVECTOR && right.getEvalType() == ExprNode.tVECTOR) {
            evalType = ExprNode.tVECTOR;
        } else {
            evalType = ExprNode.tINVLIAD;
        }
    }
}
